xen/arm: mm: fix nr_second calculation in setup_frametable_mappings
authorPeng Fan <van.freenix@gmail.com>
Thu, 12 May 2016 13:03:08 +0000 (21:03 +0800)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 16 May 2016 15:27:04 +0000 (16:27 +0100)
commit2c86f0e1ac35b4c9e9502d969693f3264d3eda1e
treec33c3df7ddc6989b56591e1bd3ab861c540622d1
parentad4aa3619f436e3ed79eea8498ac18aa8d5e6b83
xen/arm: mm: fix nr_second calculation in setup_frametable_mappings

On ARM64, "frametable_size >> SECOND_SHIFT" computes the number
of second level entries, not the number of second level pages.

"ROUNDUP(frametable_size, FIRST_SIZE) >> FIRST_SHIFT" which computes
the number of the first level entries (the number of second level pages),
is the correct one that should be used.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/mm.c